Skip to content

Conversation

@grouma
Copy link
Member

@grouma grouma commented Mar 17, 2020

  • LoadStrategy now has the following:
    • moduleForServerPath
    • serverPathForModule
    • serverPathForAppUri
  • Since there is a flavor of LoadStrategy for each compiler, we now have consistency with handling module names and no longer leak Google3 details externally (we'll have a Google3 specific LegacyStrategy internaly)
  • Fix Frontend Server tests locally, in a follow up PR I'll enable them on Travis for the dev SDK
  • Fix Readme tests due to package:arg update

Towards #910
Closes #917

@grouma
Copy link
Member Author

grouma commented Mar 17, 2020

cc @jonahwilliams

This change along with a minor fix to Flutter Tools will ensure org-dartlang-app entries are loaded. In devfs_web.dart you need to look for cached files here:
https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/build_runner/devfs_web.dart#L385

The serverPath will now be the fully qualified path assuming you leverage this (or do something similar):
https://github.com/dart-lang/webdev/pull/925/files#diff-9e9614b8283ba14570d802d5eaa4b132R53

@grouma grouma changed the title [WIP] Delegate to LoadStratgy for module information Delegate to LoadStratgy for module information Mar 18, 2020
@grouma grouma requested review from annagrin and jakemac53 March 18, 2020 01:04
@jonahwilliams
Copy link
Contributor

Nice!

serverPath =
serverPath.startsWith('/') ? serverPath.substring(1) : serverPath;
// Remove the .js from the path.
serverPath = p.withoutExtension(serverPath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit surprising we don't remove the full extension here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our server path is of the form packages/path/path.ddc. It's commented above so it shouldn't be surprising. Should I add more comments?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is just repeating the code and not explaining why it is the way it is :D. A follow-up to clarify would be good but not required.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grouma grouma merged commit 7d8474c into master Mar 18, 2020
@grouma grouma deleted the module-api branch March 18, 2020 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dwds] modules_tests are failing with addition of FrontendServer tests

4 participants